package main;

import java.io.IOException;
import java.net.InetAddress;

import mapper.OSC2MIDIBinding;
import mapper.OSC2MIDITranslation;
import midi.MidiManager;
import osc.OSCListener;
import osc.OSCMessage;
import server.OSCServerThread;

public class OSCServer {

	private OSCServerThread thread = null;

	//accxyz fff <0.054336548> <-0.054336548> <-0.97805786>
	
	public OSCServer(OSCListener listener) throws IOException {
		this.thread = new OSCServerThread();
		this.thread.addListener(listener);
		this.thread.start();
	}

	public void send(OSCMessage message, InetAddress address) {
		this.thread.send(message, address);
	}

	public static void main(String[] args) throws IOException {
		new OSCServerThread().start();
	}
}
